package br.net.woodstock.tickettoride.jee6.web.error;

import javax.enterprise.context.Conversation;
import javax.enterprise.context.ConversationScoped;
import javax.inject.Inject;
import javax.inject.Named;

import br.net.woodstock.tickettoride.web.jsf.error.common.AbstractErrorBean;

@Named("errorBean")
@ConversationScoped
public class ErrorBean extends AbstractErrorBean {

	private static final long	serialVersionUID	= -2903910914783927112L;

	@Inject
	private Conversation		conversation;

	@Override
	public void onEnd() {
		if (!this.conversation.isTransient()) {
			this.conversation.end();
		}
	}

}
